<?php
if(!defined('IN_WEB')) {
	exit('Access Denied');
}

class IndexController extends Controller{
	function __construct(){
		parent::__construct();
		$this->taxonomyAction = new TaxonomyAction();
	}
	
	function index(){
	    $ptype_first = $this->taxonomyAction -> getPtypeFirst();
	    foreach($ptype_first as $k=>$t){
	        $first_word = chinese_substr($t['name'],0,1);
	        $from = strlen($first_word);
	        $other_words = chinese_substr($t['name'],$from);
	        
	        $t['new_name'] = '<span class="font20 fn-color-'.$t['tid'].'">'.$first_word.'</span>'.$other_words;
	        $ptype_first[$k] = $t;
	    }
	    $this->smarty->assign('ptype_first', $ptype_first);
		$this->smarty->display('portal/index/index.tpl');
	}
}